﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
using Customer_Profile.eCardReport.DBDao;
using KVB.Common;
using System.Text;
using Customer_Profile.eCard.DBDao;
using DevExpress.Data;
using DevExpress.Web.ASPxGridView;

namespace Customer_Profile.eCardReport
{
    public partial class netbank_deal_report : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!Page.IsPostBack)
            {
                txtgedatebegin.Text = DateTime.Now.ToString("yyyy-MM-01");
                txtgedateend.Text = DateTime.Now.ToString("yyyy-MM-dd");
                Comm.BindDll(ref dropBankname, "netbank_name", false, "");
            }
            BindDataView();
        }
        private void BindDataView()
        {
            string startDate = txtgedatebegin.Text;
            string endDate = txtgedateend.Text;
            string bankname = dropBankname.SelectedItem.Value;
            try
            {
                DataSet dsResult = ReportDao.NetBankDeal(startDate, endDate, bankname);
                if (dsResult != null && dsResult.Tables.Count > 0)
                {
                    ASPxGridView1.DataSource = dsResult.Tables[0];
                    ASPxGridView1.DataBind();
                }
            }
            catch (Exception ex)
            {
                Log.WriteDefaultLog("Maturity_BindDataView", ex.ToString());
            }
        }

        protected void btnExport_Click(object sender, EventArgs e)
        {
            gridExport.WriteXlsToResponse("充值金额确认");
        }

        protected void btnSearch_Click(object sender, EventArgs e)
        {

        }
    }
}